﻿using SqlSugarAndEntity.Entity;
using SqlSugarAndEntity.DataTransferObject.user;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using static SqlSugarAndEntity.Extension.DataModel;
using Repository.Base;

namespace IBaseRepository
{
    public interface IUserRepository:IBaseRepository<sys_userinfo> 
    {
        List<UserDTO> GetUserByRole(decimal RoleID);

        PageListModel<UserDTO> GetUserInfo(Expression<Func<sys_userinfo, sys_usermaporg,sys_orginfo, bool>> WhereExp,int page,int limit);

        void UpdateUserInfo(sys_userinfo user, List<sys_usermaporg> map);

        void DeleteUserinfo(Expression<Func<sys_userinfo, bool>> UserExp, Expression<Func<sys_usermaporg, bool>> MapExp);

        PageListModel<sys_userinfo> GetRoleAuthorized(decimal roleId, int page, int limit);
        PageListModel<sys_userinfo> GetRoleNotAuthorized(decimal roleId, int page, int limit);
    }
}
